<include file="Public:header" />
<link type="text/css" href="__PUBLIC__/jcms/css/list.css" rel="stylesheet" />
	
<div id="content">
	<div id="main">
		<include file="default:navig" />  
        <div id="top" style="margin-bottom:10px;">
            <form action="__ACTION__" method="get">
            <input type="hidden" name="s" value="<?php echo '/'.MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME;?>"/>
            <input type="hidden" name="act" value="search"/>
            <fieldset>
            	<legend>搜索</legend>
                <p class="fieldsetP">
                    <label>文章名称: </label>
                    <input class="sf" name="title" type="text" value="{$title}" />
                	<label>所属分类: </label>
                    <select id="cid" name="cid">
                    	<option value="">请选择...</option>
                        {$cate}
                    </select>
                    <label>排序: </label>
                    <select id="order" name="order">
                    	<option value="">请选择...</option>
                        <option value="1" <if condition="$order eq '1'">selected="selected"</if>>大到小</option>
                        <option value="2" <if condition="$order eq '2'">selected="selected"</if>>小到大</option>
                        <option value="3" <if condition="$order eq '3'">selected="selected"</if>>自定义排序</option>
                    </select> 
                    <input type="submit" value="搜索" class="button">
                </p>  
            </fieldset>    
            </form>
        </div>          
		<ul>        
        	<li style="float:right;"><p><input onclick="selflo('{:U('News/edit?act=add')}')" class="button" type="submit" value="新增文章"></p></li>
        </ul>            
    	<table class="fullwidth" cellpadding="0" cellspacing="0" border="0">
            <thead>
                <tr>
                	<td width="30" align="center">#</td>
                    <td width="100" align="center">封面图</td>
                	<td width="100" align="center">分类</td>
                    <td width="*">文章标题</td>   
                    <td width="150" align="center">创建时间</td>
                    <td width="150" align="center">操作</td>
                </tr>
            </thead>
            <tbody>
            	<volist name="lists" id="vo" empty="$empty">
                <tr>
                	<td align="center">{$vo['id']}</td>
                    <td align="center">
                    	
                    	<if condition="$vo['pic']">
                            <img src="{$vo['pic']}">
                        <else /> 
                            <img src="__PUBLIC__/home/page-cannot-be-found.png">
                        </if>
                        
                    </td>
                	<td align="center">{$vo['cname']}</td>
                    <td>{$vo.title}</td>
                    <td align="center">{$vo['add_time']|date="Y-m-d H:i:s",###}</td>
                    <td align="center">
                    	<a href="<?php echo getMyUrl('www');?>/article/{$vo['id']}" target="_blank">预览</a>   
                        <a href="{:U('News/edit/?act=edit&id='.$vo['id'])}">修改</a>   
                        <a href="#" onclick="del('{$vo['id']}','{$model}')">删除</a>
                    </td>
                </tr>
                </volist>         
            </tbody>
        </table>            
        <ul>
     		<li style="float:right; margin-right:5px;">{$page}</li>
        </ul>
	</div>
</div>                
<include file="Public:footer" />    